<?php

namespace App\VO\UserOrder\Adapter;

use App\BO\OrderStatus\OrderStateDefinition;

class CRMRefundStatusDescAdapter
{
    /**
     * @var string
     */
    private $desc;

    public function __construct(int $refundState)
    {
        switch ($refundState) {
            case OrderStateDefinition::STATE_REFUND_WAITING_CHECK:
                $this->desc = '待审核';
                break;
            case OrderStateDefinition::STATE_REFUND_REJECT_BY_ADMIN:
                $this->desc = '管理员拒绝退款';
                break;
            case OrderStateDefinition::STATE_REFUND_CANCELLED_BY_USER:
                $this->desc = '用户取消退款';
                break;
            case OrderStateDefinition::STATE_REFUND_WAITING_THIRD_PART_NOTIFY:
            case OrderStateDefinition::STATE_REFUND_SUCCESS:
                $this->desc = '同意';
                break;
            default:
                $this->desc = '';
        }
    }

    public function getDesc()
    {
        return $this->desc;
    }
}
